home *** CD-ROM | disk | FTP | other *** search
/ J-Mac Electronics & Home Comics / J-Mac Electronics & Home Comics.iso / mac / J-MAC / G28F / G28_KUJI.Dxr / 00070.ls < prev    next >
Encoding:
Text File  |  1998-01-22  |  984 b   |  46 lines

  1. global gloch, glocv, x1, x2, y1, y2, high, haba
  2.  
  3. on testr
  4.   if (gloch <= x1) and (gloch >= x2) then
  5.     set gloch to gloch + 5
  6.     if gloch > x1 then
  7.       set gloch to x1
  8.     end if
  9.     set the rect of sprite 1 to rect(gloch, glocv, gloch + haba, glocv + high)
  10.   else
  11.   end if
  12. end
  13.  
  14. on testl
  15.   if (gloch >= x2) and (gloch <= x1) then
  16.     set gloch to gloch - 5
  17.     if gloch < x2 then
  18.       set gloch to x2
  19.     end if
  20.     set the rect of sprite 1 to rect(gloch, glocv, gloch + haba, glocv + high)
  21.   else
  22.   end if
  23. end
  24.  
  25. on testd
  26.   if (glocv >= y2) and (glocv <= y1) then
  27.     set glocv to glocv + 5
  28.     if glocv > y1 then
  29.       set glocv to y1
  30.     end if
  31.     set the rect of sprite 1 to rect(gloch, glocv, gloch + haba, glocv + high)
  32.   else
  33.   end if
  34. end
  35.  
  36. on testu
  37.   if (glocv >= y2) and (glocv <= y1) then
  38.     set glocv to glocv - 5
  39.     if glocv < y2 then
  40.       set glocv to y2
  41.     end if
  42.     set the rect of sprite 1 to rect(gloch, glocv, gloch + haba, glocv + high)
  43.   else
  44.   end if
  45. end
  46.